﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string username = this.username.Text;
        string password = this.username.Text;

        if (YF.BLL.User.loginorm(username, password) == true)
        {
            FormsAuthentication.SetAuthCookie(username, false);
            YF.JsHelper.AlertAndRedirect("登录成功！", "index.aspx");
        }
        else
        {
            YF.JsHelper.AlertAndRedirect("登录失败！", "login.aspx");
        }
    }
}
